<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>miniFOC: algorithm/fast_math.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="Acme_LOGO.png"/></td>
  <td id="projectalign">
   <div id="projectname">miniFOC<span id="projectnumber">&#160;1.0.3</span>
   </div>
   <div id="projectbrief">This open-source project aims to accomplish a FOC(Field Oriented Control) scheme that is operatable with minimum costs in China.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_99d3723365464dd656f512988bb8dbbd.html">algorithm</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle"><div class="title">fast_math.c File Reference</div></div>
</div><!--header-->
<div class="contents">

<p>this file contains the code implementation of sine function value lookup table and fast calculation of sine value.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="fast__math_8h_source.html">fast_math.h</a>&quot;</code><br />
</div>
<p><a href="fast__math_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a5af7fb1bc56e2917540c1322b1ddb480"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fast__math_8c.html#a5af7fb1bc56e2917540c1322b1ddb480">fast_sin</a> (float theta)</td></tr>
<tr class="memdesc:a5af7fb1bc56e2917540c1322b1ddb480"><td class="mdescLeft">&#160;</td><td class="mdescRight">fast calculation of sine  <a href="fast__math_8c.html#a5af7fb1bc56e2917540c1322b1ddb480">More...</a><br /></td></tr>
<tr class="separator:a5af7fb1bc56e2917540c1322b1ddb480"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a4efa9d728789fa7109f4250033e6e7b1"><td class="memItemLeft" align="right" valign="top">const float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fast__math_8c.html#a4efa9d728789fa7109f4250033e6e7b1">sin_tab</a> []</td></tr>
<tr class="memdesc:a4efa9d728789fa7109f4250033e6e7b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">fast sine function lookup table  <a href="fast__math_8c.html#a4efa9d728789fa7109f4250033e6e7b1">More...</a><br /></td></tr>
<tr class="separator:a4efa9d728789fa7109f4250033e6e7b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >this file contains the code implementation of sine function value lookup table and fast calculation of sine value. </p>
<dl class="section author"><dt>Author</dt><dd>Lao·Zhu </dd></dl>
<dl class="section version"><dt>Version</dt><dd>V1.0.1 </dd></dl>
<dl class="section date"><dt>Date</dt><dd>10. October 2021 </dd></dl>

<p class="definition">Definition in file <a class="el" href="fast__math_8c_source.html">fast_math.c</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a5af7fb1bc56e2917540c1322b1ddb480" name="a5af7fb1bc56e2917540c1322b1ddb480"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5af7fb1bc56e2917540c1322b1ddb480">&#9670;&nbsp;</a></span>fast_sin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float fast_sin </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>theta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>fast calculation of sine </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">theta</td><td>angle to be calculated </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">sine</td><td>value of angle theta </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="fast__math_8c_source.html#l00072">72</a> of file <a class="el" href="fast__math_8c_source.html">fast_math.c</a>.</p>

<p class="reference">References <a class="el" href="fast__math_8c_source.html#l00015">sin_tab</a>.</p>

<p class="reference">Referenced by <a class="el" href="foc_8c_source.html#l00099">foc_calculate_dutycycle()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a4efa9d728789fa7109f4250033e6e7b1" name="a4efa9d728789fa7109f4250033e6e7b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4efa9d728789fa7109f4250033e6e7b1">&#9670;&nbsp;</a></span>sin_tab</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const float sin_tab[]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>fast sine function lookup table </p>

<p class="definition">Definition at line <a class="el" href="fast__math_8c_source.html#l00015">15</a> of file <a class="el" href="fast__math_8c_source.html">fast_math.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="fast__math_8c_source.html#l00072">fast_sin()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
